<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="file:///android_asset/lemon/css/constants.css" />
<link rel="stylesheet" type="text/css" href="file:///android_asset/lemon/css/shop.css" />
<script type="text/javascript" src="file:///android_asset/lemon/js/jquery.min.js" />
<script type="text/javascript" src="file:///android_asset/lemon/js/constants.js" />
<script type="text/javascript" src="file:///android_asset/lemon/js/shop.js" />
<script type="text/javascript">
var server_address = window.lemon.js2client(4,null);
var data1 = window.lemon.httpGet(server_address+"/tom/servlet/C2S9wantBuy?all=all");
</script>
</head>

<body>
<div id='head'>
		<p id='title' align='center' >分享想买的东西给大家哇</p>
		
</div>
<script type="text/javascript">
//document.write("<textarea id='who' align='center' >点击输入谁</textarea>");
document.write("<textarea id='where' align='center' >点击输入去哪</textarea>");
document.write("<textarea id='what' align='center' >点击输入买什么</textarea>");
document.write("<textarea id='price' align='center' >点击输入价格</textarea>");
document.write("<img src='file:///android_asset/lemon/res/share1.png'  width='123' height='236' id='share' ></img>");
document.write("<hr width='220' align='left' size=1 color=#9d9d9d style='FILTER: alpha(opacity=80,finishopacity=30);left:0px;'>");

</script>

<script type="text/javascript">
var str3 = new String(data1);
var news = new Array();
news = str3.split("~");
document.write("<div id='mark'>");
var j = "";
for(var i = 0,j = 0; i < news.length -1;j++, i++){
	if(j > 20){
		break;
	}
	var new_id = news[i].replace(/(.*)莪(.*)峩(.*)僫(.*)鄂(.*)呝(.*)/,"$6");
	var time = news[i].replace(/(.*)莪(.*)峩(.*)僫(.*)鄂(.*)呝(.*)/,"$4");
	time = time.replace(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+).(\d+)/,"$2月$3日 $4点$5分");
	news[i] = news[i].replace(/(.*)莪(.*)峩(.*)僫(.*)鄂(.*)呝(.*)/,"<strong id='name'>$1</strong>想去$2买<br><br><br>$3<br><br>￥$5");
	//var new_id = news[i].replace(/(.*)ID:(\d+)<br>(.*)/,"$2");
	var news1 = "<p id='content'  width='80' height='120' >"+news[i]+"</p>";
	document.write("<div class='content' id='"+new_id+"' align='center'>");
	document.write(news1+time);
	document.write("</div>");
}
document.write("<p id='last'></p>");
$(document).ready(function(){
	$(window).scroll(function() {
	    if(document.body.scrollTop + document.body.clientHeight > document.body.scrollHeight / 10 ){
		if(j == news.length-1 ){
			return;
		}
		for(i = j ; i < news.length -1;i++){
			if(i < j * 2){
				var new_id = news[i].replace(/(.*)莪(.*)峩(.*)僫(.*)鄂(.*)呝(.*)/,"$6");
				var time = news[i].replace(/(.*)莪(.*)峩(.*)僫(.*)鄂(.*)呝(.*)/,"$4");
				time = time.replace(/(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+).(\d+)/,"$2月$3日 $4点$5分");
				news[i] = news[i].replace(/(.*)莪(.*)峩(.*)僫(.*)鄂(.*)呝(.*)/,"<strong id='name'>$1</strong>想去$2买<br><br><br>$3<br><br>￥$5");
				$("p#last").append( "<div class='content' id='"+new_id+"'><p  id='content' width='80' height='120'>"+news[i]+time+"</p></div>");
			}else{
				break;
			}
		}
		j = i;
		$(document).ready(function(){
			$("div.content").click(function(){
				window.lemon.js2client(2,"friends_detail.html?_id="+this.id+"&user_id="+user_id);
			});
		});
		}
	});
});


</script>


</body>
</html>